import java.util.HashMap;
import java.util.Objects;

/**
 * @Author 12629
 * @Description：
 */
class Person {
    public  String id;

    public Person(String id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "id:"+id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return Objects.equals(id, person.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}


public class Test {

    public static void main(String[] args) {
        Person person1 = new Person("1234");
        Person person2 = new Person("1234");
        HashBuck2<Person,String> map = new HashBuck2<>();
        map.put(person1,"gaobo");
        System.out.println(map.get(person2));


        HashMap<Person,String> map2 = new HashMap<>();

    }

    public static void main1(String[] args) {
        HashBuck hashBuck = new HashBuck();
        hashBuck.put(1,110);
        hashBuck.put(2,111);
        hashBuck.put(3,112);
        hashBuck.put(14,11);
        hashBuck.put(5,11);
        hashBuck.put(6,11);
        hashBuck.put(7,11);
        hashBuck.put(8,11);
        hashBuck.put(9,11);
        hashBuck.put(10,11);
        System.out.println("=====");
        System.out.println(hashBuck.get(1));
    }
}
